#pragma once
#include "includes.h"
#include "Config.h"

struct CameraPosition
{
	int X;
	int Y;
};

class GraphicEngine
{
private: 
	static GraphicEngine* m_Instance; // The instance for the gEngine singelton
	CameraPosition m_CameraPos;

private: 
	SDL_Surface* m_MainScreen; // The main drawing screen !!!!!

public:
	GraphicEngine(void); //CTOR
	~GraphicEngine(void); //DTOR

	bool init(void);
	void DrawIMG(SDL_Surface *img, int x, int y);
	void DrawIMG(SDL_Surface *img, int x, int y, int w, int h, int x2, int y2);

	void OferBelisnky(){int i = 1; int j = 0; int k = i/j;}; // Written by ofer belinsky
	void DrawTerrain(SDL_Surface* terrain);
	SDL_Surface* ImageLoad(char *file);

public:
	static GraphicEngine* GetInstance();
private: 
	SDL_Surface* GetMainScreen();
	void SetMainScreen(SDL_Surface* screen);

	void Slock(SDL_Surface *screen);
	void Sulock(SDL_Surface *screen);
};
